Skip to content

Fix autoSizeThatFits wrong calculations#221

Merged
lucdion merged 1 commit into
layoutBox:masterfrom
IgorBulyga:bugfix/autoSizeThatFits
Dec 17, 2020
Merged

Fix autoSizeThatFits wrong calculations#221
lucdion merged 1 commit into
layoutBox:masterfrom
IgorBulyga:bugfix/autoSizeThatFits

Conversation

@IgorBulyga

@IgorBulyga IgorBulyga commented Dec 10, 2020

Copy link
Copy Markdown

As I described in #220, there is a problem with size calculations of inner views while using autoSizeThatFits. To make it works correctly we need just update autoSizingRect of each views before layout starts.

There is example from ticket with this fix. As you can see it works as it should.

Fixed example

autoSizeThatFits

@antoinelamy Please check this fix.

Thank you.

@lucdion lucdion left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, thank you for this Nice fix

@lucdion

lucdion commented Dec 10, 2020

Copy link
Copy Markdown
Member

@antoinelamy, would you mind checking this change? 🙏

@antoinelamy

Copy link
Copy Markdown
Contributor

Yes I was looking at this bug and came with a similar solution as well but wanted to take more time to ensure it was not causing any other side effect. Will try to take the time soon.

@lucdion

lucdion commented Dec 17, 2020

Copy link
Copy Markdown
Member

@antoinelamy what is the risk of accepting this PR? From my point of view, it looks like a legit fix. What do you think could cause issues?
Thanks

@antoinelamy

Copy link
Copy Markdown
Contributor

@antoinelamy what is the risk of accepting this PR? From my point of view, it looks like a legit fix. What do you think could cause issues?
Thanks

I investigated this last weekend and it look fine, we can merge this. Thanks @IgorBulyga for figuring this out.

@antoinelamy antoinelamy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lucdion

lucdion commented Dec 17, 2020

Copy link
Copy Markdown
Member

Thanks @IgorBulyga @antoinelamy

@lucdion lucdion merged commit a908791 into layoutBox:master Dec 17, 2020
@IgorBulyga IgorBulyga deleted the bugfix/autoSizeThatFits branch December 18, 2020 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants